package com.leonzhangxf.aop.program;

import org.aopalliance.intercept.MethodInterceptor;
import org.aopalliance.intercept.MethodInvocation;

/**
 * 编程式Advice
 *
 * @author leonzhangxf
 * @date 20190529
 */
public class CustomMethodInterceptor implements MethodInterceptor {

    @Override
    public Object invoke(MethodInvocation invocation) throws Throwable {
        Object obj = invocation.proceed();
        System.out.println("Method after.");
        return obj;
    }
}
